[mirrors]
http://mupdf.com/downloads/archive/mupdf-1.9a-source.tar.gz

[vars]
filesize=20493793
sha512=9f804fd65c2dc6b7a3bd73961b1f1a8bf93d52903cccf6302acd6982dfa433125a3b8e77b808984921aee097877280fa21aafb87468cd0a8e4cfa900284a262b
desc='fast and relatively unbloated PDF viewer. used on embedded devices'

[deps]
musl
zlib
curl
freetype
jbig2dec
libjpeg
libxext
libressl

[deps.host]
freetype
zlib
libressl
jbig2dec

[build]
rm -rf thirdparty/curl thirdparty/freetype thirdparty/jpeg thirdparty/zlib thirdparty/jbig2dec
for i in fontdump cmapdump bin2hex cquote ; do
	make verbose=yes CC=cc \
	FREETYPE_CFLAGS=-I/usr/include/freetype2 \
	FREETYPE_LIBS=-lfreetype \
	OPENSSL_CFLAGS="-DHAVE_OPENSSL" \
	OPENSSL_LIBS="-lssl -lcrypto" \
	build=release build/release/"$i"
done
CFLAGS="$optcflags" \
LDFLAGS="$optldflags  -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  make verbose=yes -j $MAKE_THREADS DESTDIR="$butch_install_dir" \
  prefix="$butch_prefix" build=release install
